package com.chen.auth.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * @author: ~龙~
 * @date: 2023/6/19 14:23
 **/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@TableName("oauth_client_details")
@ApiModel(value = "OauthClientDetails对象", description = "客户端信息")
public class OauthClientDetails extends Model<OauthClientDetails> {

    @ApiModelProperty("客户端ID")
    @TableId(value = "client_id", type = IdType.INPUT)
    private String clientId;

    @ApiModelProperty("资源ID集")
    @TableField(value = "resource_ids")
    private String resourceIds;

    @ApiModelProperty("客户端密码")
    @TableField(value = "client_secret")
    private String clientSecret;

    @ApiModelProperty("客户端明文密码")
    @TableField(value = "client_secret_plaintext")
    private String clientSecretPlaintext;

    @ApiModelProperty("范围")
    @TableField(value = "scope")
    private String scope;

    @TableField(value = "authorized_grant_types")
    private String authorizedGrantTypes;

    @TableField(value = "web_server_redirect_uri")
    private String webServerRedirectUri;

    @TableField(value = "authorities")
    private String authorities;

    @ApiModelProperty("token存活时间")
    @TableField(value = "access_token_validity")
    private Integer accessTokenValidity;

    @ApiModelProperty("refreshToken存活时间")
    @TableField(value = "refresh_token_validity")
    private Integer refreshTokenValidity;

    @TableField(value = "additional_information")
    private String additionalInformation;

    @TableField(value = "autoapprove")
    private String autoapprove;
}
